﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace UAC.Operation
{
    public class DocumentFieldDef
    {
        /// <summary>
        /// DB Primary Key
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// Custom ID
        /// </summary>
        public int DocumentDefID { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }

        public DocumentFieldDef() { }

        public DocumentFieldDef(DataRow dr)
        {
            this.ID = Convert.ToInt32(dr["id"]);
            this.DocumentDefID = Convert.ToInt32(dr["documentdefid"]);
            this.Name = dr["name"].ToString();
            this.Description = dr["description"].ToString();
        }

        public override string ToString()
        {
            return this.Name;
        }
    }
}
